
<script>
   var _form=$('form-add_producttype')
   var _formActionURL=_form.get('action');

   submit_producttypeForm=function(event)
   {
	   var target={
               onComplete:function(rs){
                   if(JSON.decode(rs).error) {
                       return ;
                   }
                   /*
                   if(window.opener.finderGroup&&window.opener.finderGroup['<{$env.get.finder_id}>']){
			            window.opener.finderGroup['<{$env.get.finder_id}>'].refresh();
			        }*/
                   window.close();                   
               }};
       _form.store('target',target);
       _form.fireEvent('submit',new Event(event));
   }

</script>

<form id="form-add_producttype" name="form-add_producttype"
	action="index.php?app=yswarranty&ctl=site_mywarranty&act=addproducttype"
	method="post" >
	<div class="division">
		<h4><{t}>商品名稱<{/t}></h4>
		<{input type="text" vtype="required" name="product_category" value=""
		class="x-input " autocomplete="off"}>
	</div>

	<div class='division'>
		<h4><{t}>機種<{/t}></h4>
		<{input name="product_styles" type="textarea" value=""
		vtype="required" style="width:100%"}>
	</div>

	<{capture name='footbar'}>
	<table cellspacing="0" cellpadding="0" class="table-action">
		<tbody>
			<tr valign="middle">
				<td><{assign var="message" value="关 闭"}>
				<{assign var="message1"	value=$___gift="确定退出?"|t:'gift'}> 
				<{button label=$___gift="保存并关闭窗口"|t:'gift' class="btn-primary" onclick="submit_producttypeForm(event)"}>
				<{button label=$___gift=$message|t:'gift' class="btn-secondary" onclick="if(confirm('{$message1}'))window.close()"}>
				</td>
			</tr>
		</tbody>
	</table>
	<{/capture}>
</form>





